home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97a.txt / 000020_icon-group-sender _Wed Jan 22 21:17:41 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Thu, 23 Jan 1997 09:24:29 MST
  2. X-Authentication-Warning: hill.ucr.edu: joan owned process doing -bs
  3. Date: Wed, 22 Jan 1997 21:17:41 -0800 (PST)
  4. From: Junrong Yuan <joan@cs.ucr.edu>
  5. X-Sender: joan@hill.ucr.edu
  6. Reply-To: Junrong Yuan <joan@cs.ucr.edu>
  7. To: icon-group@cs.arizona.edu
  8. Subject: Icon Compiling 
  9. Message-Id: <Pine.LNX.3.95.970122211340.14809A-100000@hill.ucr.edu>
  10. Mime-Version: 1.0
  11. Content-Type: TEXT/PLAIN; charset=US-ASCII
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14. Content-Length: 1775
  15.  
  16. Dear Sirs
  17.  
  18.     I got an interesting problem when trying to compile the following
  19. short Icon program:
  20.  
  21. **
  22.     procedure main()
  23.       L  :=  [ 1, 2, 3 ];    # Set L to a list of 3 small integers
  24.       Change_All ( L );      # This procedure does not affect L
  25.       every write ( ! L );   # Display the values of L
  26.       Change_One ( L );      # This procedure changes the first element of
  27. L
  28.       every write ( ! L );   # Display the values of L
  29.     end
  30.     procedure Change_All ( foo )  # This does not affect the caller's
  31. foo...
  32.      foo  :=  86;                 # ...because we are not changing...
  33.     end                           # ...a PART of an aggregate
  34.     procedure Change_One ( foo )  # This procedure affects the caller's
  35. foo...
  36.       foo[1]  :=  99;             # ...because we are changing...
  37.     end                           # ...a PART of an aggregate
  38.  
  39. **
  40.     
  41.     When I use icnt -x, the program runs correctly and ouput right
  42. results, as the following:
  43. --
  44. 1052 > icont test -x
  45. Translating:
  46. test.icn:
  47.   main
  48.   Change_All
  49.   Change_One
  50. No errors
  51. Linking:
  52. Executing:
  53. 1
  54. 2
  55. 3
  56. 99
  57. 2
  58. 3
  59. hill: /home/csgrads/joan/Class/CS181/ICON/learning 
  60.  
  61.     while if I try the other way around, first compile it and then
  62. execute, it won't give out any output at all! See the following:
  63. --
  64. 1053 > test
  65. hill: /home/csgrads/joan/Class/CS181/ICON/learning 
  66.  
  67. --
  68.  
  69.     I am not sure the reason about this. Am I missing something? I am
  70. looking forward to hearing from you.
  71.  
  72.     THank you very much!
  73.  
  74.     Joan
  75.  
  76. --
  77.  
  78. Joan Yuan                        |VOICE : (909)787-2953                
  79. Dept. Of Computer Science        |FAX   : (909)787-4643                
  80. University Of California         |WWW   : http://www.cs.ucr.edu/~joan/ 
  81. Riverside, CA 92521-0304         |EMAIL : joan@cs.ucr.edu              
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.